package com.st.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.st.mapper.StCourseCategoriesMapper;
import com.st.domain.StCourseCategories;
import com.st.service.IStCourseCategoriesService;

/**
 * 课程分类Service业务层处理
 *
 * @author zhw
 * @date 2024-10-24
 */
@Service
public class StCourseCategoriesServiceImpl extends ServiceImpl<StCourseCategoriesMapper, StCourseCategories> implements IStCourseCategoriesService {
    @Autowired
    private StCourseCategoriesMapper stCourseCategoriesMapper;

    /**
     * 查询课程分类
     *
     * @param id 课程分类主键
     * @return 课程分类
     */
    @Override
    public StCourseCategories selectStCourseCategoriesById(Integer id) {
        return stCourseCategoriesMapper.selectStCourseCategoriesById(id);
    }

    /**
     * 查询课程分类列表
     *
     * @param stCourseCategories 课程分类
     * @return 课程分类
     */
    @Override
    public List<StCourseCategories> selectStCourseCategoriesList(StCourseCategories stCourseCategories) {
        return stCourseCategoriesMapper.selectStCourseCategoriesList(stCourseCategories);
    }

    /**
     * 新增课程分类
     *
     * @param stCourseCategories 课程分类
     * @return 结果
     */
    @Override
    public int insertStCourseCategories(StCourseCategories stCourseCategories) {
            return stCourseCategoriesMapper.insertStCourseCategories(stCourseCategories);
    }

    /**
     * 修改课程分类
     *
     * @param stCourseCategories 课程分类
     * @return 结果
     */
    @Override
    public int updateStCourseCategories(StCourseCategories stCourseCategories) {
        return stCourseCategoriesMapper.updateStCourseCategories(stCourseCategories);
    }

    /**
     * 批量删除课程分类
     *
     * @param ids 需要删除的课程分类主键
     * @return 结果
     */
    @Override
    public int deleteStCourseCategoriesByIds(Integer[] ids) {
        return stCourseCategoriesMapper.deleteStCourseCategoriesByIds(ids);
    }

    /**
     * 删除课程分类信息
     *
     * @param id 课程分类主键
     * @return 结果
     */
    @Override
    public int deleteStCourseCategoriesById(Integer id) {
        return stCourseCategoriesMapper.deleteStCourseCategoriesById(id);
    }
}